using System;
using System.Collections.Generic;
namespace ServiceStack.Logging
{
	public class TestLogger : ILog
	{
		public enum Levels
		{
			DEBUG,
			ERROR,
			FATAL,
			INFO,
			WARN
		}
		private static List<KeyValuePair<TestLogger.Levels, string>> _logs = new List<KeyValuePair<TestLogger.Levels, string>>();
		public bool IsDebugEnabled
		{
			get;
			set;
		}
		public TestLogger(string type)
		{
		}
		public TestLogger(Type type)
		{
		}
		public static IList<KeyValuePair<TestLogger.Levels, string>> GetLogs()
		{
			return TestLogger._logs;
		}
		private static void Log(TestLogger.Levels level, object message, Exception exception)
		{
			string text = (message == null) ? string.Empty : message.ToString();
			if (exception != null)
			{
				text = text + ", Exception: " + exception.get_Message();
			}
			TestLogger._logs.Add(new KeyValuePair<TestLogger.Levels, string>(level, text));
		}
		private static void LogFormat(TestLogger.Levels level, object message, params object[] args)
		{
			string text = (message == null) ? string.Empty : message.ToString();
			TestLogger._logs.Add(new KeyValuePair<TestLogger.Levels, string>(level, string.Format(text, args)));
		}
		private static void Log(TestLogger.Levels level, object message)
		{
			string text = (message == null) ? string.Empty : message.ToString();
			TestLogger._logs.Add(new KeyValuePair<TestLogger.Levels, string>(level, text));
		}
		public void Debug(object message, Exception exception)
		{
			TestLogger.Log(TestLogger.Levels.DEBUG, message, exception);
		}
		public void Debug(object message)
		{
			TestLogger.Log(TestLogger.Levels.DEBUG, message);
		}
		public void DebugFormat(string format, params object[] args)
		{
			TestLogger.LogFormat(TestLogger.Levels.DEBUG, format, args);
		}
		public void Error(object message, Exception exception)
		{
			TestLogger.Log(TestLogger.Levels.ERROR, message, exception);
		}
		public void Error(object message)
		{
			TestLogger.Log(TestLogger.Levels.ERROR, message);
		}
		public void ErrorFormat(string format, params object[] args)
		{
			TestLogger.LogFormat(TestLogger.Levels.ERROR, format, args);
		}
		public void Fatal(object message, Exception exception)
		{
			TestLogger.Log(TestLogger.Levels.FATAL, message, exception);
		}
		public void Fatal(object message)
		{
			TestLogger.Log(TestLogger.Levels.FATAL, message);
		}
		public void FatalFormat(string format, params object[] args)
		{
			TestLogger.LogFormat(TestLogger.Levels.FATAL, format, args);
		}
		public void Info(object message, Exception exception)
		{
			TestLogger.Log(TestLogger.Levels.INFO, message, exception);
		}
		public void Info(object message)
		{
			TestLogger.Log(TestLogger.Levels.INFO, message);
		}
		public void InfoFormat(string format, params object[] args)
		{
			TestLogger.LogFormat(TestLogger.Levels.INFO, format, args);
		}
		public void Warn(object message, Exception exception)
		{
			TestLogger.Log(TestLogger.Levels.WARN, message, exception);
		}
		public void Warn(object message)
		{
			TestLogger.Log(TestLogger.Levels.WARN, message);
		}
		public void WarnFormat(string format, params object[] args)
		{
			TestLogger.LogFormat(TestLogger.Levels.WARN, format, args);
		}
	}
}
